<template>
	<view class="container">
		<!-- 实时预览场景：加 debounce 防抖 -->
		<FuiParse
			:content="mdText"
			type="markdown"
			:debounce="300"
			:preview-image="true"
			:custom-style="{ fontSize: '15px', lineHeight: '1.7' }"
		/>
		<!-- 静态内容：无需防抖 -->
		<FuiParse :content="htmlText" type="html" />
	</view>
</template>

<script>
import FuiParse from '@/components/FuiParse/FuiParse.vue';

export default {
	components: { FuiParse },
	data() {
		return {
			mdText: `# Hello\n\`\`\`js\nconsole.log(1)\n\`\`\``,
			htmlText: `<h1>Static HTML</h1>`,
		};
	},
};
</script>
